#include <iostream>
#include <cstdlib>

int main(int argc, char* argv[]) {
    std::cout << "=== DevOps Platform ===" << std::endl;
    std::cout << "VC++2005 Support: Enabled" << std::endl;
    
    if (argc > 1) {
        std::string cmd = argv[1];
        if (cmd == "build" && argc > 2) {
            std::string compiler = argv[2];
            if (compiler == "vs2005") {
                std::cout << "Starting VC++2005 build..." << std::endl;
                return system("tools/scripts/build-vs2005.bat");
            }
            else if (compiler == "vs2022") {
                std::cout << "Starting VC++2022 build..." << std::endl;
                return system("tools/scripts/build-vs2022.bat");
            }
        }
        else if (cmd == "status") {
            std::cout << "Build Status:" << std::endl;
            std::cout << "  VC++2022: tools/scripts/build-vs2022.bat" << std::endl;
            std::cout << "  VC++2005: tools/scripts/build-vs2005.bat" << std::endl;
        }
        else if (cmd == "clean") {
            std::cout << "Cleaning builds..." << std::endl;
            system("if exist build rmdir /s /q build");
            system("if exist build-vs2005 rmdir /s /q build-vs2005");
        }
    } else {
        std::cout << "Usage: devops-platform.exe [build vs2005|build vs2022|status|clean]" << std::endl;
    }
    
    return 0;
}
